<template>
  <div class="screen-full">
    <svg-icon icon-class="exit-fullscreen" style="color: #fff; width: 20px; height: 20px" @click="changeScreen" />
  </div>
</template>
<script>
// npm i screenfull@5
import ScreenFull from 'screenfull/dist/screenfull'

export default {
  name: 'ScreenFull',
  data() {
    return {}
  },
  computed: {},
  methods: {
    changeScreen() {
      if (!ScreenFull.isEnabled) {
        this.$message.warning('此时全屏不可用！')
        return
      }
      ScreenFull.toggle() // 全屏切换
    }
  }
}
</script>

<style scoped lang="scss"></style>
